<template>
	<view class="mf-drug">
		<view class="mf-drug-header">
			<view class="mf-drug-logo"><image src="https://jlmkkj.oss-accelerate.aliyuncs.com/upload/config/000/000/001/5f36682a2a821733.png"></image></view>
			<view class="mf-drug-header-right">
				<view class="mf-drug-scan"></view>
				<view class="mf-drug-addr">
					<view class="mf-drug-addr-choose">{{config.city.area_name}}</view>
					<view class="mf-drug-weather">
						<text class="mf-drug-weather-text">{{ weatherMsg.text }}</text>
						<text>{{ weatherMsg.temp }}℃</text>
					</view>
				</view>
			</view>
		</view>
		<view class="mf-drug-info">
			<view class="mf-drug-search">
				<view class="mf-drug-btn"></view>
				<input class="mf-drug-input" type="text" confirm-type="search" placeholder="搜药品 / 疾病 / 症状">
			</view>
			<view class="mf-drug-swiper">
				<swiper>
					<swiper-item>
						<view>1111</view>
					</swiper-item>
				</swiper>
			</view>
		</view>
		<TabBar :tabbar="tabbar"/>
	</view>
</template>

<script>
	import common from '../../../utils/common.js'
	import TabBar from '../../../appComponent/platcommon/tabbar.vue'
	export default {
		data() {
			return {
				config:{
					city:{
						area_name:'长春'
					}
				},
				weatherMsg:{
					text:'晴',
					temp:'20'
				},
				tabbar: {},
			}
		},
		components:{
			TabBar
		},
		methods: {
		
		},
		onShow() {
			const _this = this
			common.editTabbar('', function(tabbar){
				_this.tabbar = tabbar
			});
		},
		mounted(){
			common.getConfig(data=> {
				this.config = data
			})
			uni.getStorage({
				key:"mf_weather",
				success:res=>{
					const _weatherMsg = JSON.parse(res.data)
					this.weatherMsg = _weatherMsg
				}
			})
		},
		onPageScroll(Object){
		},
	}
</script>

<style lang="scss">
	@import './drug.scss';
</style>
